package com.wolf.etl.core.dialect;

import com.wolf.etl.model.EtlTableModel;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author sdyang
 * @date 2019/10/13 17:25
 **/
@Service("PostgresqlDialect")
public class PostgresqlDialect extends AbstractDialect {

    @Override
    public String buildPaginationSql(String originalSql, int offset, int limit) {
        String sql = " %s limit %s offset %s ";
        return String.format(sql, originalSql, limit, offset);
    }

    @Override
    public String buildInsertSelect(EtlTableModel table, String targerTableName, Map<String, String> fields) {
        return null;
    }
}
